package com.zdy.reflection;

/**
 * Created by 逸足天涯
 * on 3/5/2020.
 */
public class Test05 {
    public static void main(String[] args) {
        A a = new A();
        System.out.println(A.m);
        /*
         1.加载到内存，会产生一个类对应的Class对象。
         2.链接 链接结束后m = 0;
         3.初始化
           <clinti>(){
                       System.out.println("A类静态代码块初始化");
                        m = 300;
                        m = 100;
           }
         */
    }
}
class A{
    static int m =100;
    static {
        System.out.println("A类静态代码块初始化");
        m = 300;
    }
    public A(){
        System.out.println("A类无参构造初始化");
    }
}
